package com.hb.core.pojo.portal.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hb.core.pojo.portal.entity.PortalFile;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 门户下载文件DTO
 */
@Data
public class PortalFileDTO extends PortalFile {
    @ApiModelProperty(value = "文件大小")
    private Long fileSize;

    @ApiModelProperty(value = "OSS文件名，上传时候生成的")
    private String downloadFileName;

    @ApiModelProperty(value = "文件类型(扩展名)")
    private String extName;

    @ApiModelProperty(value = "远程(本地)文件地址(路径)")
    private String fileUrl;

    @ApiModelProperty(value = "发布时间： 开始时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishStartDate;

    @ApiModelProperty(value = "发布时间： 结束时间")
    @JsonFormat(shape= JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime  publishEndDate;

    @ApiModelProperty(value = "发布时间-字符串")
    private String publishDate;
}
